In data storage systems, such as disk drives, there is a need to be able to accurately detect data that has been stored on a storage media. For example, in a magnetic disk drive, data is stored as a coded series of magnetic transitions on the surface of a magnetic disk. An analog signal is formed by reading the magnetic transitions. The analog signal is sampled to detect bits, and the bits are decoded to recover the data. A clock signal controls the sampling of the analog signal and decoding of the detected bits.